<?php
require_once '../../source/core/run.php';
$id = Core_Fun::detect_number(Core_Fun::rec_post("id"));
if(intval($id)>0){
	$hits = 0;
	$sql	= "SELECT hits FROM ".DB_PREFIX."job WHERE jobid='".intval($id)."'";
	$rows	= $db->fetch_first($sql);
	if($rows){
		$hits = ($rows['hits']+1);
		$db->update(DB_PREFIX."job",array('hits'=>'[[hits+1]]',),"jobid='".intval($id)."'");
	}
	echo("document.write('".$hits."');");
}
?>